<!DOCTYPE html>
<html class="x-admin-sm">
<#include "../layout/meta.ftl">
<body class="layui-layout-body">
<div style="margin: 2vw">
    <#if init??>
        <button type="button" id="init" class="layui-btn layui-btn-normal">初始化仓库</button>
        <p>编辑配置文件 /etc/docker/daemon.json 忽律仓库https</p>
        <code>
            {
                "insecure-registries": [
                "ip:port"
                ]
            }
        </code>
    <#else>
        <p>已经初始化</p>
    </#if>

    <table class="layui-table">
        <colgroup>
            <col width="150">
            <col width="200">
        </colgroup>
        <thead>
        <tr>
            <th>镜像名字</th>
        </tr>
        </thead>
        <tbody>
        <#list data as node>
        <tr>
            <td>${node}</td>
        </tr>
        </#list>
        </tbody>
    </table>


</div>
<script>
    //JavaScript代码区域
    layui.use('element', function () {
        let element = layui.element;
        $("#init").click(function () {
            xadmin.open('初始化仓库', '/registry/init', 500, 300);
        });
    });

</script>
</body>
</html>